.TH g_analyze 1 "Thu 26 Aug 2010" "" "GROMACS suite, VERSION 4.5"
.SH NAME
g_analyze - analyzes data sets

.B VERSION 4.5
.SH SYNOPSIS
\f3g_analyze\fP
.BI "\-f" " graph.xvg "
.BI "\-ac" " autocorr.xvg "
.BI "\-msd" " msd.xvg "
.BI "\-cc" " coscont.xvg "
.BI "\-dist" " distr.xvg "
.BI "\-av" " average.xvg "
.BI "\-ee" " errest.xvg "
.BI "\-bal" " ballisitc.xvg "
.BI "\-g" " fitlog.log "
.BI "\-[no]h" ""
.BI "\-[no]version" ""
.BI "\-nice" " int "
.BI "\-[no]w" ""
.BI "\-xvg" " enum "
.BI "\-[no]time" ""
.BI "\-b" " real "
.BI "\-e" " real "
.BI "\-n" " int "
.BI "\-[no]d" ""
.BI "\-bw" " real "
.BI "\-errbar" " enum "
.BI "\-[no]integrate" ""
.BI "\-aver_start" " real "
.BI "\-[no]xydy" ""
.BI "\-[no]regression" ""
.BI "\-[no]luzar" ""
.BI "\-temp" " real "
.BI "\-fitstart" " real "
.BI "\-fitend" " real "
.BI "\-smooth" " real "
.BI "\-filter" " real "
.BI "\-[no]power" ""
.BI "\-[no]subav" ""
.BI "\-[no]oneacf" ""
.BI "\-acflen" " int "
.BI "\-[no]normalize" ""
.BI "\-P" " enum "
.BI "\-fitfn" " enum "
.BI "\-ncskip" " int "
.BI "\-beginfit" " real "
.BI "\-endfit" " real "
.SH DESCRIPTION
\&g_analyze reads an ascii file and analyzes data sets.
\&A line in the input file may start with a time
\&(see option \fB \-time\fR) and any number of y values may follow.
\&Multiple sets can also be
\&read when they are separated by & (option \fB \-n\fR),
\&in this case only one y value is read from each line.
\&All lines starting with  and @ are skipped.
\&All analyses can also be done for the derivative of a set
\&(option \fB \-d\fR).


\&All options, except for \fB \-av\fR and \fB \-power\fR assume that the
\&points are equidistant in time.


\&g_analyze always shows the average and standard deviation of each
\&set. For each set it also shows the relative deviation of the third
\&and fourth cumulant from those of a Gaussian distribution with the same
\&standard deviation.


\&Option \fB \-ac\fR produces the autocorrelation function(s).


\&Option \fB \-cc\fR plots the resemblance of set i with a cosine of
\&i/2 periods. The formula is:
2 (int0\-T y(t) cos(i pi t) dt)2 / int0\-T y(t) y(t) dt

\&This is useful for principal components obtained from covariance
\&analysis, since the principal components of random diffusion are
\&pure cosines.


\&Option \fB \-msd\fR produces the mean square displacement(s).


\&Option \fB \-dist\fR produces distribution plot(s).


\&Option \fB \-av\fR produces the average over the sets.
\&Error bars can be added with the option \fB \-errbar\fR.
\&The errorbars can represent the standard deviation, the error
\&(assuming the points are independent) or the interval containing
\&90% of the points, by discarding 5% of the points at the top and
\&the bottom.


\&Option \fB \-ee\fR produces error estimates using block averaging.
\&A set is divided in a number of blocks and averages are calculated for
\&each block. The error for the total average is calculated from
\&the variance between averages of the m blocks B_i as follows:
\&error2 = Sum (B_i \- B)2 / (m*(m\-1)).
\&These errors are plotted as a function of the block size.
\&Also an analytical block average curve is plotted, assuming
\&that the autocorrelation is a sum of two exponentials.
\&The analytical curve for the block average is:

\&f(t) = sigma sqrt(2/T (  a   (tau1 ((exp(\-t/tau1) \- 1) tau1/t + 1)) +

\&                       (1\-a) (tau2 ((exp(\-t/tau2) \- 1) tau2/t + 1)))),
where T is the total time.
\&a, tau1 and tau2 are obtained by fitting f2(t) to error2.
\&When the actual block average is very close to the analytical curve,
\&the error is sigma*sqrt(2/T (a tau1 + (1\-a) tau2)).
\&The complete derivation is given in
\&B. Hess, J. Chem. Phys. 116:209\-217, 2002.


\&Option \fB \-bal\fR finds and subtracts the ultrafast "ballistic"
\&component from a hydrogen bond autocorrelation function by the fitting
\&of a sum of exponentials, as described in e.g.
\&O. Markovitch, J. Chem. Phys. 129:084505, 2008. The fastest term
\&is the one with the most negative coefficient in the exponential,
\&or with \fB \-d\fR, the one with most negative time derivative at time 0.
\&\fB \-nbalexp\fR sets the number of exponentials to fit.


\&Option \fB \-gem\fR fits bimolecular rate constants ka and kb
\&(and optionally kD) to the hydrogen bond autocorrelation function
\&according to the reversible geminate recombination model. Removal of
\&the ballistic component first is strongly adviced. The model is presented in
\&O. Markovitch, J. Chem. Phys. 129:084505, 2008.


\&Option \fB \-filter\fR prints the RMS high\-frequency fluctuation
\&of each set and over all sets with respect to a filtered average.
\&The filter is proportional to cos(pi t/len) where t goes from \-len/2
\&to len/2. len is supplied with the option \fB \-filter\fR.
\&This filter reduces oscillations with period len/2 and len by a factor
\&of 0.79 and 0.33 respectively.


\&Option \fB \-g\fR fits the data to the function given with option
\&\fB \-fitfn\fR.


\&Option \fB \-power\fR fits the data to b ta, which is accomplished
\&by fitting to a t + b on log\-log scale. All points after the first
\&zero or negative value are ignored.

Option \fB \-luzar\fR performs a Luzar & Chandler kinetics analysis
\&on output from \fB g_hbond\fR. The input file can be taken directly
\&from \fB g_hbond \-ac\fR, and then the same result should be produced.
.SH FILES
.BI "\-f" " graph.xvg" 
.B Input
 xvgr/xmgr file 

.BI "\-ac" " autocorr.xvg" 
.B Output, Opt.
 xvgr/xmgr file 

.BI "\-msd" " msd.xvg" 
.B Output, Opt.
 xvgr/xmgr file 

.BI "\-cc" " coscont.xvg" 
.B Output, Opt.
 xvgr/xmgr file 

.BI "\-dist" " distr.xvg" 
.B Output, Opt.
 xvgr/xmgr file 

.BI "\-av" " average.xvg" 
.B Output, Opt.
 xvgr/xmgr file 

.BI "\-ee" " errest.xvg" 
.B Output, Opt.
 xvgr/xmgr file 

.BI "\-bal" " ballisitc.xvg" 
.B Output, Opt.
 xvgr/xmgr file 

.BI "\-g" " fitlog.log" 
.B Output, Opt.
 Log file 

.SH OTHER OPTIONS
.BI "\-[no]h"  "no    "
 Print help info and quit

.BI "\-[no]version"  "no    "
 Print version info and quit

.BI "\-nice"  " int" " 0" 
 Set the nicelevel

.BI "\-[no]w"  "no    "
 View output xvg, xpm, eps and pdb files

.BI "\-xvg"  " enum" " xmgrace" 
 xvg plot formatting: \fB xmgrace\fR, \fB xmgr\fR or \fB none\fR

.BI "\-[no]time"  "yes   "
 Expect a time in the input

.BI "\-b"  " real" " \-1    " 
 First time to read from set

.BI "\-e"  " real" " \-1    " 
 Last time to read from set

.BI "\-n"  " int" " 1" 
 Read  sets separated by &

.BI "\-[no]d"  "no    "
 Use the derivative

.BI "\-bw"  " real" " 0.1   " 
 Binwidth for the distribution

.BI "\-errbar"  " enum" " none" 
 Error bars for \-av: \fB none\fR, \fB stddev\fR, \fB error\fR or \fB 90\fR

.BI "\-[no]integrate"  "no    "
 Integrate data function(s) numerically using trapezium rule

.BI "\-aver_start"  " real" " 0     " 
 Start averaging the integral from here

.BI "\-[no]xydy"  "no    "
 Interpret second data set as error in the y values for integrating

.BI "\-[no]regression"  "no    "
 Perform a linear regression analysis on the data. If \-xydy is set a second set will be interpreted as the error bar in the Y value. Otherwise, if multiple data sets are present a multilinear regression will be performed yielding the constant A that minimize chi2 = (y \- A0 x0 \- A1 x1 \- ... \- AN xN)2 where now Y is the first data set in the input file and xi the others. Do read the information at the option \fB \-time\fR.

.BI "\-[no]luzar"  "no    "
 Do a Luzar and Chandler analysis on a correlation function and related as produced by g_hbond. When in addition the \-xydy flag is given the second and fourth column will be interpreted as errors in c(t) and n(t).

.BI "\-temp"  " real" " 298.15" 
 Temperature for the Luzar hydrogen bonding kinetics analysis

.BI "\-fitstart"  " real" " 1     " 
 Time (ps) from which to start fitting the correlation functions in order to obtain the forward and backward rate constants for HB breaking and formation

.BI "\-fitend"  " real" " 60    " 
 Time (ps) where to stop fitting the correlation functions in order to obtain the forward and backward rate constants for HB breaking and formation. Only with \-gem

.BI "\-smooth"  " real" " \-1    " 
 If = 0, the tail of the ACF will be smoothed by fitting it to an exponential function: y = A exp(\-x/tau)

.BI "\-filter"  " real" " 0     " 
 Print the high\-frequency fluctuation after filtering with a cosine filter of length 

.BI "\-[no]power"  "no    "
 Fit data to: b ta

.BI "\-[no]subav"  "yes   "
 Subtract the average before autocorrelating

.BI "\-[no]oneacf"  "no    "
 Calculate one ACF over all sets

.BI "\-acflen"  " int" " \-1" 
 Length of the ACF, default is half the number of frames

.BI "\-[no]normalize"  "yes   "
 Normalize ACF

.BI "\-P"  " enum" " 0" 
 Order of Legendre polynomial for ACF (0 indicates none): \fB 0\fR, \fB 1\fR, \fB 2\fR or \fB 3\fR

.BI "\-fitfn"  " enum" " none" 
 Fit function: \fB none\fR, \fB exp\fR, \fB aexp\fR, \fB exp_exp\fR, \fB vac\fR, \fB exp5\fR, \fB exp7\fR or \fB exp9\fR

.BI "\-ncskip"  " int" " 0" 
 Skip N points in the output file of correlation functions

.BI "\-beginfit"  " real" " 0     " 
 Time where to begin the exponential fit of the correlation function

.BI "\-endfit"  " real" " \-1    " 
 Time where to end the exponential fit of the correlation function, \-1 is until the end

.SH SEE ALSO
.BR gromacs(7)

More information about \fBGROMACS\fR is available at <\fIhttp://www.gromacs.org/\fR>.
